<template>
    <div class="ps-gw-list">
        <section class="selectBox">
            <div>
                <el-select v-model="value" placeholder="请选择" style="width:100%">
                    <!-- <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option> -->
                    <el-option value="11">111</el-option>
                </el-select>
            </div>
        </section>
        <div>
            <div class="list" v-for="item in list" :key="item.value" @click="toDetails(item.id,item.point.wgLon,item.point.wgLat)">
                <div class="head"><b>{{item.name}}</b><i class="iconfont icon-jiantou-copy"></i></div>
                <div class="flex">
                    <div class="type">进水流量：{{item.inflowWater}}</div>
                    <div class="type">出水流量：{{item.outflowWater}}</div>
                </div>
                <div class="flex">
                    <div class="type">进水压力：{{item.intakePressure}}</div>
                    <div class="type">出水压力：{{item.ratedPressure}}</div>
                </div>
                <div class="flex">
                    <div class="type">能耗：{{item.energyConsumption}}kW/h</div>
                    <div class="type">药耗：{{item.medicineConsumption}}</div>
                </div>
                <div class="area">
                    <span @click="toMap(item.point.wgLon,item.point.wgLat)">查看地图<i class="iconfont icon-icon-"></i></span>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            list: [],
            value: ''
        }
    },
    mounted() {
        this.getList()
    },
    methods: {
        //获取污水厂列表
        getList() {
            this.$api.paishuibengzhan.drainagepumings().then(res => {
                if (res.success) {
                    this.list = res.data.list
                }
            });
        },
        //跳转到详情
        toDetails(id,x,y) {
            this.$router.push({ path: 'details', query: { id: id, x: x, y: y } })
        },
        //地图
        toMap(x, y) {
            this.$router.push({ path: '/bigmap', query: { x: x, y: y } })
            event.stopPropagation();

        }
    }
}
</script>

<style>
</style>
